A nonvolatile memory such as a flash memory has restriction on the writing count. Hence, an information processing device that includes a nonvolatile memory performs wear levelling control with respect to the nonvolatile memory. For example, the information processing device manages the writing count either in units of pages representing the units for writing or in units of blocks that are larger than the pages, and writes data averagely on a page-by-page basis. As a result, the information processing device can extend the life of the nonvolatile memory.
In recent years, a high-speed nonvolatile memory called a storage class memory has been developed. In a storage class memory, in addition to enabling writing of data in units of pages, data can also be written in, for example, units of bytes that are smaller than pages. Such a nonvolatile memory in which data can be written in units of bytes can be used as the main memory device that serves as the work area for a central processing unit (CPU).
When a nonvolatile memory functions as a main memory device of the CPU, it gets directly accessed in units of cache lines or in units of bytes in response to a store instruction or a load instruction issued by the CPU. Hence, in case the CPU runs a malicious computer program that causes writing at particular addresses in a local manner (i.e., causes a high volume of writing in the same area within a short period of time), there is a risk that the nonvolatile memory cannot function normally. Thus, an information processing device having a nonvolatile memory as the main memory device needs to be equipped with a security function for detecting unauthorized writing at particular memory addresses.
In order to detect local writing at particular addresses, the information processing device needs to accurately count the volume of writing performed at the concerned addresses of the nonvolatile memory. However, because of task of counting the writing count in units of cache lines or units of bytes, the structure for management becomes a complex and large-scale structure, thereby resulting in an increase in the cost of the information processing device. Hence, an information processing device needs to be able to accurately detect, at low cost, local writing performed in the nonvolatile memory.
Moreover, in case unauthorized writing at particular memory addresses is detected, the information processing device needs to prevent a situation in which the nonvolatile memory does not function normally. Thus, in the information processing device that includes a nonvolatile memory as the main memory device, in case unauthorized writing is detected at particular memory addresses of the nonvolatile memory, the information processing device needs to be equipped with a security function for preventing a situation in which the nonvolatile memory does not function normally.